package servbean;

public class MyBounds {
	private int x;
	private int y;
	private int width;
	private int height;

	public MyBounds(){}
	
	public MyBounds(int i, int j, int k, int l) {
		this.x=i;
		this.y=j;
		this.width=k;
		this.height=l;
	}
	
	public void boundsUp(MyBounds myBounds, int i){
		this.x = myBounds.getX() - i;
		this.y = myBounds.getY() - i;
		this.width = myBounds.getWidth() + 2*i;
		this.height = myBounds.getHeight() + 2*i;
	}
	
	public void boundsDown(MyBounds myBounds, int i){
		this.x = myBounds.getX() + i;
		this.y = myBounds.getY() + i;
		this.width = myBounds.getWidth() - 2*i;
		this.height = myBounds.getHeight() - 2*i;
	}
	
	public void setLocation(int x, int y) {
		this.x = x;
		this.y = y;
	}

	public void setSize( int width, int height){
		this.width = width;
		this.height = height;
	}
	
	public int getX() {
		return x;
	}

	public void setX(int x) {
		this.x = x;
	}

	public int getY() {
		return y;
	}

	public void setY(int y) {
		this.y = y;
	}

	public int getWidth() {
		return width;
	}

	public void setWidth(int width) {
		this.width = width;
	}

	public int getHeight() {
		return height;
	}

	public void setHeight(int height) {
		this.height = height;
	}

}
